import { Iframe } from '@/components/Iframe';
import { useAppSelector } from '@/redux/store';
import { getCurrToken } from '@/utils';

export default function PostResource() {
  const { entId } = useAppSelector((state) => state.loginEnt);
  const safeToken = getCurrToken();
  const currOrigin =
    process.env.processEnvDetail.NODE_ENV === 'development' ? 'http://mp.test1.logibeat.com' : window.origin;
  const iframeUrl =
    currOrigin +
    '/netPlatform-xihui/index.html?token=' +
    safeToken +
    '&entId=' +
    entId +
    '&gowhere=dynamiclist&fromType=safeEduPc';

  console.log('---iframeUrl---', iframeUrl);

  return (
    <>
      <Iframe src={iframeUrl}></Iframe>
    </>
  );
}
